//<my-pre :init-string="strings"></mypre>
//利用hereDoc函数来解决多行的字符串
//在实例中输入strings
function hereDoc(f) {　
        return f.toString().replace(/^[^\/]+\/\*!?\s?/, '').replace(/\*\/[^\/]+$/, '');
};

Vue.component('my-pre',{
    props:{
    initString:{
            type:String,
            default:''
        }
    },
    template:'\
        <div>\
            <pre>\
                <code class="javascript xml  hljs" style="font-size:16px;width:100%;font-family: Courier, monospace">{{transdata}}\
                    </code>\
            </pre>\
        </div>',
    data(){
            return {
                    transdata:this.initString
            }
        },
});

